let flag=1;
let idStr=my$("stuId")
idStr.addEventListener("keyup",function () {
    flag=this.value.length==0?flag=0:flag=1;
});
idStr.addEventListener("focus",function () {
    flag=this.value.length==0?flag=0:flag=1;
});
idStr.addEventListener("blur",function () {
    flag=this.value.length==0?flag=0:flag=1;
});


my$("btn").onclick=function () {
    if(flag){
        let idStr=my$("stuId").value;
        let parStr="id="+idStr;
        ajax("student/update.php","POST",parStr,show);
    }else{
        alert("id不能为空");
    }
    function show() {
        alert("删除成功");
    }

}



